﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace DotNetUI.Controls
{
    /// <summary>
    /// 导航栏标题
    /// </summary>
    public class DotNetAzureNavBarHeader:Control, IIsChecked
    {
        static DotNetAzureNavBarHeader()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DotNetAzureNavBarHeader), new FrameworkPropertyMetadata(typeof(DotNetAzureNavBarHeader)));
        }
        public static readonly DependencyProperty IconBackgroundProperty = DependencyProperty.Register(nameof(IconBackground), typeof(Brush), typeof(DotNetAzureNavBarHeader));
        public static readonly DependencyProperty IconProperty = DependencyProperty.Register(nameof(Icon), typeof(object), typeof(DotNetAzureNavBarHeader));
        public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register(nameof(Caption), typeof(object), typeof(DotNetAzureNavBarHeader));
        public static readonly DependencyProperty StatusProperty = DependencyProperty.Register(nameof(Status), typeof(UIElement), typeof(DotNetAzureNavBarHeader));
        /// <summary>
        /// 图标
        /// </summary>
        public object Icon { get => this.GetValue(IconProperty); set => SetValue(IconProperty, value); }
        /// <summary>
        /// 标题
        /// </summary>
        public object Caption { get => this.GetValue(CaptionProperty); set => SetValue(CaptionProperty, value); }
        /// <summary>
        /// 扩展元素
        /// </summary>
        public UIElement Status { get => (UIElement)this.GetValue(StatusProperty); set => SetValue(StatusProperty, value); }

        public Brush IconBackground { get => (Brush)this.GetValue(IconBackgroundProperty); set => SetValue(IconBackgroundProperty, value); }
        /// <summary>
        /// 是否选中
        /// </summary>
        public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register(nameof(IsChecked), typeof(bool), typeof(DotNetAzureNavBarHeader), new PropertyMetadata(false));
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsChecked { get => this.GetValue<bool>(IsCheckedProperty); set => SetValue(IsCheckedProperty, value); }
    }
}
